package com.edu.udistrital.util;

import java.io.IOException;
import java.util.Properties;

public class Configuration {
	
	Properties properties = null;
	
    /** archivo de configuracion */
    public static final String CONFIG_FILE_NAME = "configuracion.properties";
	
    private Configuration() {
        this.properties = new Properties();
        try {
            properties.load(Configuration.class.getClassLoader().getResourceAsStream(CONFIG_FILE_NAME));
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
    
    public static Configuration getInstance() {
        return ConfiguracionHolder.INSTANCE;
    }
    
    private static class ConfiguracionHolder {
        private static final Configuration INSTANCE = new Configuration();
    }
    
    public String getProperty(String key) {
        return this.properties.getProperty(key);
    }
    
}
